﻿/*----------------------------------------------------------------
//  <copyright file="IEmailReceiver.cs" company="MicroCloud@151504200868">
//      Copyright © 2020-2024 MicroCloud Corporation, All rights reserved.
//  </copyright>
//  <site>https://gitee.com/chenmm123/microclouds</site>
//  <last-editor>cmm</last-editor>
//  <last-date>2023-02-24 18:42</last-date>
//----------------------------------------------------------------*/

using MimeKit;

namespace MicroCloud
{
    #region "Email接收功能接口"
    /// <summary>
    /// Email接收功能接口
    /// </summary>
    public interface IEmailReceiver
    {
        #region "方法"
        #region "接收邮件"
        /// <summary>
        /// 接收邮件
        /// </summary>
        /// <param name="options">邮件配置信息</param>
        /// <returns>邮件消息列表</returns>
        /// <exception cref="Exception">微云框架异常信息</exception>
        List<MimeMessage> ReceiveEmail(EmailReceiverOptions options = null);
        #endregion

        #region "异步接收邮件"
        /// <summary>
        /// 异步接收邮件
        /// </summary>
        /// <param name="options">邮件配置信息</param>
        /// <returns>邮件消息列表</returns>
        /// <exception cref="Exception">微云框架异常信息</exception>
        Task<List<MimeMessage>> ReceiveEmailAsync(EmailReceiverOptions options = null);
        #endregion

        #endregion

    }
    #endregion

}
